﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Utilities.ViewModel
{
    /// <summary>
    /// 分页类
    /// </summary>
    public class PagingInfo
    {
        /// <summary>
        /// 总项目数
        /// </summary>
        public int TotalItems { get; set; }
        /// <summary>
        /// 每页项目数
        /// </summary>
        public int ItemsPerPage { get; set; }
        /// <summary>
        /// 当前页
        /// </summary>
        public int CurrentPage { get; set; }
        /// <summary>
        /// 总页数
        /// </summary>
        public int TotalPages
        {
            get { return (int)Math.Ceiling((decimal)TotalItems / ItemsPerPage); }
        }

    }
}
